home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
F1 Licenseware
/
F1 Licenseware - Volume 1.iso
/
disks
/
028.dms
/
028.adf
/
Features_of_the_Shell
/
Scripts
< prev
next >
Wrap
Text File
|
1992-02-26
|
2KB
|
34 lines
Scripts
A script file is a text file that is created by any text editor, for example
Ed. It does not, however, contain words, but CLI commands in a list, one
per line. Script files can be executed, line by line, with the command
Execute. The scripts are read by AmigaDOS then the commands are executed
in order, one by one. Script files can save you a lot of time by doing
repetitive tasks. For example, if you regularly copied a dozen files from
one disk to another you could write a script then execute it every time you
needed the task doing. this means you type out the instructions once only,
instead of every time. The semicolon (;) is used by scripts to add
comments. Anything to the right of a semicolon is ignored. You can only
put one command per line.
An example script
; Any comment can be put to the right of a semicolon, even a CLI command
; This script prints a line into the current CLI window then closes it.
Echo "Hello, I am going to close your CLI window"
Endcli
THIS LINE IS NEVER EXECUTED
Scripts are stored in the S: directory of your Workbench disk. Try loading
some into Ed. The most common script is the file Startup-Sequence, which
you will find in the S: directory of all bootable disks (except game disks).
It usually loads the workbench then closes the CLI window.
You can stop a script file by holding down Ctrl and the D key at the same
time. The words * Shell... Break appear in the CLI window. Try doing this
on your Workbench disk as it loads.
There are many commands you can use in scripts. These can be found in the
main part of this disk - the
C.L.Index.